<%@page import="com.kaishengit.pms.entity.Employee"%>
<%@page import="com.kaishengit.pms.util.TimeNoteUtil"%>
<%@page import="com.kaishengit.pms.entity.Contactnote"%>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE HTML>
<html lang="zh-CN">
<head>
	<meta charset="UTF-8">
	<title>凯盛项目管理系统</title>
	<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css" />
	<script type="text/javascript" src="js/jquery.js"></script>
	<script type="text/javascript" src="js/bootstrap.min.js"></script>
	<style type="text/css">
		body{
			background-image:url(img/bb.jpg);
			background-repeat:repeat-x;
		}
	</style>
</head>
<body class="body">
	<%@ include file="include/main-top.jsp" %>
	<div class="container">
	  <div class="row">
		
		<jsp:include page="include/left.jsp">
			<jsp:param value="contact" name="tag"/>
		</jsp:include>
		<div class="span9">
			<ul class="breadcrumb" style="margin-bottom:0px;border-radius: 3px 3px 0 0">
				<li class="active">
					<a href="task.html"><i class="icon-user"></i>联系人</a>
				</li>
			</ul>
			<div class="well">
				<div class="row">
					<div class="span3">
						<a href="contact.jspx?m=loginaddcontact" class="btn span2"><i class="icon-plus"></i>添加联系人</a>
						<div class="clear" style=""></div>
						<ul class="unstyled" style="margin-top:15px;float:left">
						
							<c:forEach var="contactlist" items="${contactlist}">
								<li style="line-height:30px">
									<i class="icon-list-alt"></i><a href="contact.jspx?m=showcontact&contactid=${contactlist.id }">${contactlist.name}</a>
								</li>
							</c:forEach>
						</ul>
					</div>
					<div class="span5" style="min-height:400px;border-left:1px solid #ccc;padding-left:15px">
						<address>
							<h3>${contact.name}</h3>
							<p>${contact.companyname}</p>
							<small>手机</small>${contact.mobile}<br/>
							<small>固话</small> ${contact.tel}<br/><br/>
							<small>邮箱</small> ${contact.email}<br/>
							<small>地址</small>${contact.address}<br/><br/>
							<small>主页</small> <a href="${contact.website}">${contact.website}</a><br/>
							<small>微博</small> <a href="${contact.weibo}">${contact.weibo}</a><br/>
						</address>
						<div class="line">记录</div>
						<% 
							List<Contactnote>  notelists = (List<Contactnote>)session.getAttribute("cnlist");
							for(Contactnote notelist : notelists){
												
						%>
							<blockquote>
							  <%= notelist.getContent() %>
							  <small><%=notelist.getEmployee().getUsername()%><%=TimeNoteUtil.getTime(notelist.getCreatime()) %>发布</small>
							</blockquote>
						<%} %>
						<a href="contact.jspx?m=showallnote&id=${contact.id}">查看所有记录</a>
						
						<br/><br/><br/>

						<a class="btn btn-primary" href="contact.jspx?m=updatecontact&id=${contact.id}"><i class="icon-pencil icon-white"></i>编辑</a>
						<a class="btn btn-danger" href="contact.jspx?m=deletecontact&contactid=${contact.id}"><i class="icon-trash icon-white"></i>删除</a>

					</div>
				</div>
			</div>
		</div>
	  </div>
	</div>

</body>

</html>